<%-- 
Document   : adminSectionsEnrollment
Created on : Nov 17, 2013, 4:35:16 PM
Author     : Patrick
--%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="shortcut icon" href="../../assets/ico/favicon.png">

        <title>GRS Admin Sections</title>

        <!-- Bootstrap core CSS -->
        <link href="../libs/bootstrap/css/bootstrap.css" rel="stylesheet">

        <!-- Custom styles for this template -->
        <link href="../stylesheets/grid.css" rel="stylesheet">

        <!-- jQWidgets CSS -->
        <link href="../libs/jqwidgets/styles/jqx.base.css" rel="stylesheet">

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!--[if lt IE 9]>
          <script src="../../assets/js/html5shiv.js"></script>
          <script src="../../assets/js/respond.min.js"></script>
        <![endif]-->
    </head>

    <body>
        <header>
            <nav class="navbar navbar-default" role="navigation">
                <div class="navbar-header"><p class="navbar-text navbar-left">Grade Report System</p></div>
                <form class="" method="post" action="adminUsers" >
                    <ul class="nav navbar-nav">
                        <li><a href="../grs/adminUsers">Users</a></li>
                        <li><a href="../grs/adminCourses">Courses</a></li>
                        <li class="active"><a href="">Sections</a></li>
                    </ul>
                </form>
                <form class="navbar-form navbar-right" method="post" action="../login" >
                    <div class="form-group">Signed in as ${sessionScope.UserName}</div>
                    <button id="logout" name="logout" type="submit" class="btn btn-link">(Log out)</button>
                </form>

        </nav>    
    </header>
    <div class="container">
        <div id="successMessageContainer" class="alert alert-success" style="display: none;">
            <a class="close" data-dismiss="alert" href="#">×</a><span id="successMessage">${messages.success}</span>
        </div>
        <div id="errorMessageContainer" class="alert alert-danger" style="display: none;">
            <a class="close" data-dismiss="alert" href="#">×</a><span id="errorMessage">${messages.error}</span>
        </div>
        
        <form class="" method="post" action="adminEnroll" >
        <p class="navbar-text navbar-right">
            <button type="submit" class="btn btn-default btn-lg" name="backToSections" id="backToSections">
                <span class="glyphicon glyphicon-arrow-left"></span> Return to Sections 
            </button>
        </p>
        </form>
        <h2>Enroll Students</h2>
        <p class="lead">Select the students to enroll in this section.</p>
        <div class="list-group">
            <h4 class="list-group-item-heading">(${section.getSectionName()}) <span class="text-info"> ${section.getCourse().getCourseCode()} - ${section.getCourse().getCourseName()}</span></h4>
            <p class="list-group-item-text">${section.getProfessor().getFirstName()} ${section.getProfessor().getLastName()}</p>
        </div>
        <form id="frmForStudentsGrid" class="form-group" method="post" action="adminEnroll" >
            <input type="hidden" id="inputSectionId" name="inputSectionId" value="${inputSectionId}">
            <button type="submit" class="btn btn-primary" name="enrollStudents" id="enrollStudents"><span class="glyphicon glyphicon-check"></span> Enroll Students </button>
        
             <p></p>
             
              <!--<input type="hidden" id="inputUserId" name="inputUserId"> -->
             
             <div id="studentsGrid"></div>
        </form>

        
    </div> <!-- /container -->


        <!-- Bootstrap core JavaScript
        ================================================== -->
        <script src="../libs/jquery/jquery-2.0.3.min.js"></script>
        <script src="../libs/jqwidgets/jqx-all.js"></script>
        <script src="../libs/bootstrap/js/bootstrap.min.js"></script>
        <script src="../scripts/adminSectionsEnroll.js"></script>
        <!-- Placed at the end of the document so the pages load faster -->
    </body>
</html>

